getUriForFile
Return a content URI for a given File. Specific temporary permissions for the content URI can be set with grantUriPermission, or added to an Intent by calling setData() and then setFlags(); in both cases, the applicable flags are FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION. A FileProvider can only return a content
Uri for file paths defined in their <paths>
meta-data element. See the Class Overview for more information.
Return
A content URI for the file.
Parameters
A Context for the current component.
The authority of a FileProvider defined in a <provider>
element in your app's manifest.
Throws
When the given File is outside the paths supported by the provider.
Return a content URI for a given File. Specific temporary permissions for the content URI can be set with grantUriPermission, or added to an Intent by calling setData() and then setFlags(); in both cases, the applicable flags are FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION. A FileProvider can only return a content
Uri for file paths defined in their <paths>
meta-data element. See the Class Overview for more information.
Return
A content URI for the file.
Parameters
A Context for the current component.
The authority of a FileProvider defined in a <provider>
element in your app's manifest.
The filename to be displayed. This can be used if the original filename is undesirable.
Throws
When the given File is outside the paths supported by the provider.